#include <iostream>
#include <bitset>
#include <stdexcept>
#include <fstream>
#include <map>
#include "judge.hpp"

class Ia
{
	private:
		/** int[0] => ponderation IA, int[1] ponderation ennemi  **/
		std::map<std::string, int*> _weighting; 

	private:
		bool	double3;
		bool	latePrise;
		Judge	*judge;
		std::bitset<1444> *map;
		int     depth;
		int     nbNode;
		int		nbrCoup;
		int		player;
		int		getMin();
		int		getMax();
		int		curY;
		int		curX;
		int		tryPlay(int player, int x, int y, std::bitset<1444> *map);
		void	min_max();
		void	startArbre();
	public:
		Ia(std::bitset<1444> *map, bool double3, bool latePrise, int player, Judge *judge);
		void	play();
};